{extend name="layout" /}
{block name="content"}
{neq name="isshare" value="1"}
<nav class="tm-footer-tools">
	{eq name=":isset($_userid)" value="true"}
		<a class="tm-footer-item cocoAjax" href="Javascript:" ajax-url="{:url('/v1/favorites/add')}" ajax-callback="suc_back" ajax-data="{  contentid:{$info.id}, typeid:2, notcheck:1}">
			{eq name=":check_fav($_userid, $info.id, 2)" value="1"}
			<span class="tm-icon tm-icon-heart-on"></span>
			<span class="tm-footer-label">已收藏</span>
			{else /}
			<span class="tm-icon tm-icon-heart"></span>
			<span class="tm-footer-label">感兴趣</span>
			{/eq}
		</a>
		{eq name="id" value="0"}
	<!-- 	<a class="tm-footer-item tm-footer-item-on cocoAjax" href="Javascript:" confirm="你是否确定要对需求-<{$info.title}>-进行预约，若没有在规定时间内完成，将扣除一定积分。" ajax-url="{:url('/v1/requires/pick_add')}" ajax-callback="suc_back" ajax-data="{  requiresid:{$info.id}}">
			<span class="tm-icon tm-icon-puls"></span>
			<span class="tm-footer-label">预约</span>
		</a> -->
		<a class="tm-footer-item tm-footer-item-on" href="{:url('/index/index/yuyue',['requiresid'=>$info.id,'receive_uid'=>$meminfo.id])}
		" >
			<span class="tm-icon tm-icon-puls"></span>
			<span class="tm-footer-label">预约</span>
		</a>
	
		{else /}
		<a class="tm-footer-item tm-footer-item-on cocoAjax" href="Javascript:" confirm="确定要取消预约吗？" ajax-url="{:url('/v1/requires/delete_pick')}" ajax-callback="suc_back" ajax-data="{ pickid:{$id}}">
			<span class="tm-icon tm-icon-puls"></span>
			<span class="tm-footer-label">取消预约</span>
		</a>
		{/eq}
		<a class="tm-footer-item" href="Javascript:" onclick="start_chat({$meminfo.id}, '{$meminfo.nickname}')">
			<span class="tm-icon tm-icon-comment"></span>
			<span class="tm-footer-label">消息</span>
		</a>
	{else /} 
		<a class="tm-footer-item" href="Javascript:" onclick="close_open_new_window('login')">
			<span class="tm-icon tm-icon-heart"></span>
			<span class="tm-footer-label">感兴趣</span>
		</a>
		<a class="tm-footer-item tm-footer-item-on cocoAjax" href="Javascript:" onclick="close_open_new_window('login')">
			<span class="tm-icon tm-icon-puls"></span>
			<span class="tm-footer-label">预约</span>
		</a>
		<a class="tm-footer-item" href="Javascript:" onclick="close_open_new_window('login')">
			<span class="tm-icon tm-icon-comment"></span>
			<span class="tm-footer-label">消息</span>
		</a>
	{/eq}
</nav>
{/neq}
<div class="mui-content">
	<div class="uk-margin-small">
		<div class="mui-table-view mui-in-zero">
			<div class="mui-table-view-cell mui-media no-active-bg">
				<div class="mui-pull-right mui-media-body uk-text-right">
					<div class="uk-text-muted uk-text-small">
						已付{eq name="info.status" value="1"}定金{else /}全额{/eq}<span class="uk-text-orange">{$info.price}元</span>
					</div>
					{eq name="info.status" value="1"}
					<div class="uk-text-mini uk-text-muted">
						订单完成之后支付余下赏金
					</div>
					{/eq}
				</div>
				<a class="mui-pull-left" href="{:url('member/personal', ['id'=>$meminfo.id])}"><img class="uk-border-circle uk-margin-xsmall-right" src="{$meminfo.avatar}" width="42" height="42"></a>
				<div class="mui-media-body" style="width: 84%;">
					<div class="">
						{$meminfo.nickname}
					</div>
					<div class="uk-text-xmini uk-text-muted mui-pull-right" style="color: black;">
						截止时间：{$info.deadline}
					</div>
					<div class="uk-text-mini uk-text-muted">
						下单类型：{$info.catname}
					</div>
				</div>
			</div>
			<div class="mui-table-view-cell no-active-bg">
				<div class="mui-table uk-text-small">
					<div class="mui-table-cell uk-width-2-3">
						<div class="mui-ellipsis">
							{$info.title}
						</div>
					</div>
					<div class="mui-table-cell  uk-text-right">
						<div class="uk-text-xmini uk-text-muted">
							{$info.addtime}
						</div>
					</div>
				</div>
				<div class="uk-text-xmini uk-text-gray line-height-xsmall uk-margin-small-top">
					<p>
						{$info.content}
						<a href="{:url('addevas',['id'=>$info.id])}" style="float: right;"><img src="{$images_path}tm-icon-comment.png" height="20" width="20"></a>
					</p>
					<p>
						{volist name="info.acce" id="v" key="k"}
						<a href="Javascript:" onclick="coco_load_album('{:implode(',', $info.acce)}', {$k})"><img src="{$v}" width="100" height="100" /></a>
						{/volist}
					</p>
				</div>
			</div>
		</div>
	</div>
	<div class="uk-margin-small">
		<div class="tm-padded">
			{$info.yynums}人预约
		</div>
		<ul class="mui-table-view uk-text-small">
			{volist name="lists" id="v"}
			 {eq name=":isset($_userid)" value="true"}
                  {eq name="meminfo.id" value="$_userid"}
					<div class="mui-media-body">
						<li class="mui-table-view-cell mui-media">
							<div class="mui-pull-right">
								<div class="uk-text-muted-2">{$v.addtime}</div>
							</div>
							<a class="mui-pull-left" href="{:url('member/personal', ['id'=>$v.userid])}"><img class="mui-media-object mui-pull-left uk-border-circle" src="{$v.avatar}" width="42" height="42"></a>
							<div class="mui-media-body">
								<div class="uk-text-warning">{$v.nickname}</div>
								<div>预约</div>
							</div>
						
							<a href="tel:{$v.phone}" style="position: absolute;margin-left: 10%;margin-top: 0%;"><img src="{$images_path}/phone.png" width="12px;">：{$v.phone}</a>
							{eq name="info.status" value="0"}
							<button class="uk-button uk-button-primary uk-button-mini cocoAjax" confirm="是否确定？" ajax-url="{:url('/v1/requires/update_status')}" ajax-data="{  id:{$v.id}, status:1}" ajax-callback="suc_back" style="float: right;margin-top: 0%;height: 30px;" type="button">选择</button>
							{else /}
								{eq name="v.status" value="-1"}
								<button class="uk-button uk-button-mini" style="float: right;margin-right: 5px;margin-top: 0%;height: 30px; background-color: #CCCCCC;" type="button">选择</button>
								{else /}
								<button class="uk-button uk-button-danger uk-button-mini" style="float: right;margin-right: 5px;margin-top: 0%;height: 30px;" type="button">已选</button>
								{/eq}
							{/eq}
							<button class="uk-button uk-button-primary uk-button-mini" type="button" onclick="start_chat({$v.userid}, '{$v.nickname}')" style="float: right;margin-right: 5px;margin-top: 0%;height: 30px;">消息</button>
							</li>
	                   	{else /} 
						
						{/eq}
			 {else /}
					<li class="mui-table-view-cell mui-media">
							<div class="mui-pull-right">
								<div class="uk-text-muted-2">{$v.addtime}</div>
							</div>
							<a class="mui-pull-left" href="{:url('member/personal', ['id'=>$v.userid])}"><img class="mui-media-object mui-pull-left uk-border-circle" src="{$v.avatar}" width="42" height="42"></a>
							<div class="mui-media-body">
								<div class="uk-text-warning">{$v.nickname}</div>
								<div>预约</div>
							</div>
					</li>
			 {/eq}
			{/volist}
		</ul>
	</div>
	<div class="uk-margin-small">
		<div class="tm-padded">
			{$info.evas}人评论
		</div>
		<ul class="mui-table-view uk-text-small">
			{volist name=":get_model_func('Evas', 'list_data', ['typeid'=>1, 'contentid'=>$info.id])" id="v"}
			<li class="mui-table-view-cell mui-media">
				<div class="mui-pull-right">
					<div class="uk-text-muted-2">{$v.addtime}</div>
				</div>
				<a class="mui-pull-left" href="{:url('member/personal', ['id'=>$v.userid])}"><img class="mui-media-object mui-pull-left uk-border-circle" src="{$v.avatar}" width="42" height="42"></a>
				<div class="mui-media-body">
					<div class="uk-text-warning">{$v.nickname}</div>
					<div>{$v.content}</div>
				</div>
			</li>
			{/volist}
		</ul>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	function suc_back (obj, data) {
		coco_refresh_window();
	}
</script>
{/block}